//枚举
enum Colors { red, yellow, whide }

void main() {
  //获取 枚举的值
  List colors = Colors.values;
  for (var color in colors) {
    //枚举的值 的 index 为索引
    print('value = $color, index = ${color.index}');
  }
}
